package ltd.smallwang.infrastructure.task.db;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ltd.smallwang.infrastructure.task.db.model.TaskPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface TaskMapper extends BaseMapper<TaskPo> {

  List<TaskPo> queryTasks(@Param("userId") Long userId,
      @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("completeFlag") Integer completeFlag);

  TaskPo queryTaskById(@Param("id") long id);

  void clearCompleteTime(@Param("userId") Long userId, @Param("id") long id);
}
